:art: Update max_length

huangqimin001 3 years ago
parent
commit
7854bdb02c
3 changed files with 9 additions and 6 deletions
  1. 6 6
      equipment/models.py
  2. 1 0
      requirements.txt
  3. 2 0
      requirements_dj.txt

+ 6 - 6
equipment/models.py

@@ -55,8 +55,8 @@ class ThermometerEquipmentInfo(BaseModelMixin):
55 55
 
56 56
     point_id = models.CharField(_('point_id'), max_length=32, blank=True, null=True, help_text='隔离点唯一标识', db_index=True)
57 57
 
58
-    macid = models.CharField(_('macid'), max_length=255, blank=True, null=True, help_text='设备号')
59
-    sn = models.CharField(_('sn'), max_length=255, blank=True, null=True, help_text='序列号')
58
+    macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
59
+    sn = models.CharField(_('sn'), max_length=32, blank=True, null=True, help_text='序列号')
60 60
 
61 61
     active_status = models.IntegerField(_('active_status'), choices=ACTIVE_STATUE_TUPLE, default=OFFLINE, help_text='激活状态')
62 62
     active_at = models.DateTimeField(_('active_at'), blank=True, null=True, help_text=_('激活时间'))
@@ -105,8 +105,8 @@ class ThermometerMeasureInfo(BaseModelMixin):
105 105
     point_measure_ymd = models.CharField(_('point_measure_ymd'), max_length=10, blank=True, null=True, help_text='隔离点测温日期', db_index=True)
106 106
     point_measure_window = models.CharField(_('point_measure_window'), max_length=16, blank=True, null=True, help_text='隔离点测温时间段', db_index=True)
107 107
 
108
-    macid = models.CharField(_('macid'), max_length=255, blank=True, null=True, help_text='设备号')
109
-    sn = models.CharField(_('sn'), max_length=255, blank=True, null=True, help_text='序列号')
108
+    macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
109
+    sn = models.CharField(_('sn'), max_length=32, blank=True, null=True, help_text='序列号')
110 110
 
111 111
     temperature = models.FloatField(_('temperature'), default=0, help_text='用户体温')
112 112
 
@@ -135,8 +135,8 @@ class ThermometerMeasureInfo(BaseModelMixin):
135 135
 class ThermometerMeasureLogInfo(BaseModelMixin):
136 136
     point_id = models.CharField(_('point_id'), max_length=32, blank=True, null=True, help_text='隔离点唯一标识', db_index=True)
137 137
 
138
-    macid = models.CharField(_('macid'), max_length=255, blank=True, null=True, help_text='设备号')
139
-    sn = models.CharField(_('sn'), max_length=255, blank=True, null=True, help_text='序列号')
138
+    macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
139
+    sn = models.CharField(_('sn'), max_length=32, blank=True, null=True, help_text='序列号')
140 140
 
141 141
     temperature = models.FloatField(_('temperature'), default=0, help_text='用户体温')
142 142
 

+ 1 - 0
requirements.txt

@@ -2,6 +2,7 @@ StatusCode==1.0.0
2 2
 furl==2.1.2
3 3
 jsonfield==3.1.0
4 4
 mysqlclient==2.0.3
5
+pysnippets==1.1.4
5 6
 rlog==0.3
6 7
 -r requirements_dj.txt
7 8
 -r requirements_pywe.txt

+ 2 - 0
requirements_dj.txt

@@ -6,10 +6,12 @@ django-json-render==1.0.3
6 6
 django-json-response==1.1.5
7 7
 django-logit==1.1.3
8 8
 django-models-ext==1.1.10
9
+django-paginator2==1.1.3
9 10
 django-redis-connector==1.0.4
10 11
 django-response==1.1.1
11 12
 django-rlog==1.0.7
12 13
 django-short-url==1.1.6
14
+django-shortuuidfield==0.1.3
13 15
 django-six==1.0.4
14 16
 django-uniapi==1.0.10
15 17
 django-we==1.5.6